package com.mdd.admin.controller.recharge;

import com.mdd.admin.service.recharge.IRechargeOrderService;
import com.mdd.admin.validate.common.PageValidate;
import com.mdd.admin.validate.finance.FinanceRechargeSearchValidate;
import com.mdd.admin.vo.finance.FinanceRechargeListVo;
import com.mdd.common.core.AjaxResult;
import com.mdd.common.core.PageResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/recharge")
public class RechargeController {

    @Resource
    private IRechargeOrderService iRechargeOrderService;

    @GetMapping("/list")
    public AjaxResult list(@Validated PageValidate pageValidate,
                           @Validated FinanceRechargeSearchValidate searchValidate){
        PageResult<FinanceRechargeListVo> list = iRechargeOrderService.list(pageValidate, searchValidate);
        return AjaxResult.success(list);
    }
}
